import request from "@/api/index"

export default {
  /**
   * @description: 添加疾病记录 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  add (params) {
    const url = "/health/diseaseDeal/add"
    return request.post(url, {
      homeBaseId: sessionStorage.getItem("homeBaseId"),
      homeBaseType: sessionStorage.getItem("homeBaseType"),
      ...params
    })
  },
  /**
   * @description: 编辑疾病记录 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  edit (params) {
    const url = "/health/diseaseDeal/edit"
    return request.post(url, {
      ...params
    })
  },
  /**
   * @description: 编辑疾病记录详情 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  editDetail (params) {
    const url = "/health/diseaseDealDetail/edit"
    return request.post(url, {
      ...params
    })
  },
  /**
   * @description: 审核 *代表必填
   * @param {Object} auditedId 被审核的id*
   * @param {Object} auditType 审核状态,可用值:REVIEW,NOT_PASS,PASS*
   * @param {Object} auditStaffName 审核人*
   * @param {Object} auditStaffId 审核人*
   * @param {Object} failReason 审核失败原因
   * @return {Object}
   */
  audit (params) {
    const url = "/health/diseaseDeal/audit"
    return request.post(url, {
      ...params
    })
  },
  /**
   * @description: 查询直鱼数量 *代表必填
   * @param {String/Number} diseaseRecordId *
   * @return {Object}
   */
  queryById (params) {
    const url = "/health/diseaseDeal/queryById"
    return request.get(url, params)
  },
  /**
   * @description: 查询直鱼数量 *代表必填
   * @param {String/Number} diseaseRecordId *
   * @return {Object}
   */
  deadCount (params) {
    const url = "/health/diseaseDeal/deadCount"
    return request.post(url, params)
  },
  /**
   * @description: 批量删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delListById (params) {
    const url = "/health/diseaseDeal/delListById"
    return request.get(url, params)
  },
  /**
   * @description: 单个删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delById (params) {
    const url = "/health/diseaseDeal/delById"
    return request.get(url, params)
  },
  /**
   * @description: 单个删除疾病记录详情 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delByIdDetail (params) {
    const url = "/health/diseaseDealDetail/delById"
    return request.get(url, params)
  },
  /**
   * @description: 单个删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  queryByDiseaseRecordId (params) {
    const url = "/health/diseaseDeal/queryByDiseaseRecordId"
    return request.get(url, params)
  },
  /**
   * @description: 单个删除疾病记录 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  queryByDiseaseRecordIdAndAuditType (params) {
    const url = "/health/diseaseDeal/queryByDiseaseRecordIdAndAuditType"
    return request.get(url, params)
  },
  /**
   * @description: 条件查询 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryByCondition (params) {
    const url = "/health/diseaseDeal/queryByCondition"
    return request.post(url, {
      ...params
    })
  },
  /**
   * @description: 分页查询疾病记录 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
  queryPageByCondition (params) {
    const url = "/health/diseaseDeal/queryPageByCondition"
    return request.post(url, {
      homeBaseId: sessionStorage.getItem("homeBaseId"),
      homeBaseType: sessionStorage.getItem("homeBaseType"),
      ...params
    })
  },
}
